#include<bits/stdc++.h>
using namespace std;
const int maxn=100000;
int n;
int Arr[maxn+5];
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&Arr[i]);
    }
    sort(Arr+1,Arr+n+1);
    int rst=0,restt=0,lst=0;
    for(int i=1;i<=n;i++){
        if(lst!=Arr[i]){
            rst+=restt;
            restt=0;
            lst=Arr[i];
        }
        if(rst>0){
            rst--;
        }
        restt++;
    }
    printf("%d\n",rst+restt);
    return 0;
}